package cn.school.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 参会人员事件表
 * @TableName meeting_thing
 */
@TableName(value ="meeting_thing")
@Data
public class MeetingThing implements Serializable {
    /**
     * 参会人员事件id
     */
    @TableId
    private Long meetingThingId;

    /**
     * 参会人员id
     */
    private Long meetingPersonId;

    /**
     * 参会人员事件发生事件
     */
    private Date meetingThingTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MeetingThing other = (MeetingThing) that;
        return (this.getMeetingThingId() == null ? other.getMeetingThingId() == null : this.getMeetingThingId().equals(other.getMeetingThingId()))
            && (this.getMeetingPersonId() == null ? other.getMeetingPersonId() == null : this.getMeetingPersonId().equals(other.getMeetingPersonId()))
            && (this.getMeetingThingTime() == null ? other.getMeetingThingTime() == null : this.getMeetingThingTime().equals(other.getMeetingThingTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMeetingThingId() == null) ? 0 : getMeetingThingId().hashCode());
        result = prime * result + ((getMeetingPersonId() == null) ? 0 : getMeetingPersonId().hashCode());
        result = prime * result + ((getMeetingThingTime() == null) ? 0 : getMeetingThingTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", meetingThingId=").append(meetingThingId);
        sb.append(", meetingPersonId=").append(meetingPersonId);
        sb.append(", meetingThingTime=").append(meetingThingTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}